<template>
  <el-card style="width:95%;margin:35px 0px 0px 30px;">
    <div v-for="(value, index) in cardDate " :value="value" :key="value.id" :index="index"
      style="display: inline-block;width: 48%;line-height: 2.7;margin-left: 20px;margin-top: 15px;">
      <el-card>
        <div slot="header" class="clearfix" style="display:flex;margin-left: 10px;">
          <span :value="value.notes" style="align-self: center;padding-top:10px; ">{{ value.notes }}编码</span>
          <el-switch style="margin-left: 415px;margin-top: 20px;" v-model="value.flag" active-color="#13ce66"
            inactive-color="#ff4949">
          </el-switch>
        </div>
        <div class="zd1">适用范围:</div>
        <div class="zd1">审核流程:</div>
        <div class="zd1">操作时间:</div>
        <el-button style="margin-left:475px;font-size: 16px;" id="bj1" type="primary" @click="bj(value)">设置</el-button>
      </el-card>
    </div>
  </el-card>
</template>

<script>
export default {
  mounted() {
        this.init();
    },
  methods: {
    bj(val) {
      this.dialogFormVisible = true;
    },
    init() {
            axios.get('http://localhost:9286/rules/deviceRulesList', { params: { page: this.page, size: this.size, condition: this.ss } }).then(res => {
                
                console.log(res.data);
                for(var i = 0; i < res.data.records.length; i++){
                
                }
                this.cardDate = res.data;
                
            })
        }
  },
  data() {
    return {
      formEnCoding: [],
      dialogFormVisible: false,

      cardDate: [
        {
          rules_letter: 1,
          rules_time_type: '2016-05-02',
          rules_num: '王小虎',
          notes: '上海市普',
          flag: true
        }, {
          rules_letter: 1,
          rules_time_type: '2016-05-02',
          rules_num: '王小虎',
          notes: '上海市普',
          flag: true
        }, {
          rules_letter: 1,
          rules_time_type: '2016-05-02',
          rules_num: '王小虎',
          notes: '上海市普',
          flag: true
        }, {
          rules_letter: 1,
          rules_time_type: '2016-05-02',
          rules_num: '王小虎',
          notes: '上海市普',
          flag: true
        }, {
          rules_letter: 1,
          rules_time_type: '2016-05-02',
          rules_num: '王小虎',
          notes: '上海市普',
          flag: true
        }, {
          rules_letter: 1,
          rules_time_type: '2016-05-02',
          rules_num: '王小虎',
          notes: '上海市普',
          flag: true
        }

      ]
    }
  }
}
</script>

<style>
.zd1 {
  margin: 10px 0px 0px 20px;
}

#bj1 {
  font-size: 12px;
  border: 0px;
  margin-left: 190px;
  color: blue;
  background-color: white;
}

.el-card__header {
  padding: 0px 0px;
  border-bottom: 1px solid #EBEEF5;
  box-sizing: border-box;
}
</style>
